package com.spring.Repository;

import com.spring.Entity.AdminEntity;
import org.springframework.context.annotation.Bean;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * Created by CMCC-sunmo on 2016/8/26.
 */
@Repository
public interface AdminRepository extends JpaRepository<AdminEntity, String> {
    @Query("from AdminEntity a where a.adminName=?1")
    AdminEntity findOneByUserName(String adminName);

}
